package com.tarry.task;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class AsyncTaskService {

    @Async//声明该方法为异步方法
    public void executeAsyncTask(Integer i){
        System.out.println("执行异步操作：" + i);
    }

    @Async
    public void executeAysncTaskPuls(Integer i){
        System.out.println("执行异步操作+1" +(i+1));
    }
}
